//
//  FKProductParameterCell.m
//  HHShopping
//
//  Created by Macbook Pro on 2018/8/26.
//  Copyright © 2018年 Macbook Pro - Macbook Pro. All rights reserved.
//

#import "FKProductParameterCell.h"

@interface FKProductParameterCell()

@property(nonatomic, weak) UILabel *titleLabel;
@property(nonatomic, weak) UILabel *valueLabel;

@end

@implementation FKProductParameterCell


- (void)setupSubviews
{
    [super setupSubviews];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    UILabel *titleLabel = [UILabel fk_labelWithFont:fk_adjustFont(12) textColor:fkColor999999];
    [self.contentView addSubview:titleLabel];
    self.titleLabel = titleLabel;
    titleLabel.numberOfLines = 2;
    
    UILabel *valueLabel = [UILabel fk_labelWithFont:fk_adjustFont(12) textColor:fkColor(51, 51, 51)];
    [self.contentView addSubview:valueLabel];
    self.valueLabel = valueLabel;
    valueLabel.numberOfLines = 0;
    
    
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(15);
        make.centerY.equalTo(self);
        make.width.mas_equalTo(60);
    }];
    [valueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(titleLabel.mas_right).offset(10);
        make.right.equalTo(self).offset(-12);
        make.top.bottom.equalTo(self);
    }];
}

- (void)setData:(id)data
{
    [super setData:data];
    
    self.titleLabel.text = data[@"param"];
    self.valueLabel.text = data[@"value"];
}


@end
